{% load satchmo_util%}{% if shop.options.GOOGLE.USE_URCHIN.value %}
    <form style="display:none;" name="utmform">
    <textarea id="utmtrans">
    UTM:T|{{order.id}}|{{Store}}|{{order.total|truncate_decimal}}|{{order.tax|truncate_decimal}}|{{order.shipping_sub_total|truncate_decimal}}|{{order.ship_city}}|{{order.ship_state}}|{{order.ship_country}}
    {% for item in order.orderitem_set.all %}UTM:I|{{order.id}}|{{item.product.name }}|{{ item }}|{{ item.category }}|{{item.unit_price|truncate_decimal}}|{{item.quantity}}
    {% endfor %}</textarea>
    </form>

    <script type="text/javascript">
    __utmSetTrans();
    </script>
{% else %}
    <script type="text/javascript">
    pageTracker._addTrans(
     "{{order.id}}",
     "{{Store}}",
     "{{order.total|truncate_decimal}}",
     "{{order.tax|truncate_decimal}}",
     "{{order.shipping_sub_total|truncate_decimal}}",
     "{{order.ship_city}}",
     "{{order.ship_state}}",
     "{{order.ship_country}}"
    );
    {% for item in order.orderitem_set.all %}
        pageTracker._addItem(
         "{{order.id}}",
         "{{item.product.name}}",
         "{{item}}",
         "{{item.category}}",
         "{{item.unit_price|truncate_decimal}}",
         "{{item.quantity}}"
        );
    {% endfor %}
    pageTracker._trackTrans();
    </script>
{% endif %}
